<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>对象实例</title>
</head>
<body>
<%
	Object number = application.getAttribute("count");
	int num = 0;
	if(number == null)
	{
		application.setAttribute("count",1);
	}
	else
	{
		num = (Integer)number;
		num++;
		application.setAttribute("count", num);
	}
	out.print("当前访问本页面的次数为:" + num);
%>
<br>
以下是application对象信息<br>
----------------------------------------------------------
<br>
支持Servlet API主板本号：<%= application.getMajorVersion() %><br>
支持Servlet API主板本号：<%= application.getMinorVersion() %><br>
Web应用的实际路径：<%= application.getRealPath("/") %><br>
Web服务器的版本信息：<%= application.getServerInfo() %><br>
Web应用的名称为：<%= application.getServletContextName() %>
</body>
</html>